package com.ak.server.platform.service.impl;

import com.ak.common.entity.system.Application;
import com.ak.server.platform.mapper.ApplicationMapper;
import com.ak.server.platform.service.IApplicationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 系统管理
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Application> implements IApplicationService {

    @Override
    public int checkAppCodeUnique(String appCode) {
        return baseMapper.checkAppCodeUnique(appCode);
    }

    @Override
    public List<Application> selectApplicationsByTenantCode(String tenantCode) {
        return baseMapper.selectApplicationsByTenantCode(tenantCode);
    }
}
